<tr>
<td>
	<?=$aQuestion[$i]['question'];?>
</td>
<?php // einzelner Lehrer 
	if(!isset($aAddTeacher) || count($aAddTeacher) < 0){
		$sEgo = "_".$aQuestion[$i]['id']."_".$aFormDetails['teacher_id']."_"."ego";
		$sWish = "_".$aQuestion[$i]['id']."_".$aFormDetails['teacher_id']."_"."wish";
		$iEgoChecked = $iWishChecked = "";
		if(isset($_POST)){
			if(array_key_exists($sEgo, $_POST)){
				$iEgoChecked = $_POST[$sEgo];
			}
			if(array_key_exists($sWish, $_POST)){
				$iWishChecked = $_POST[$sWish];
			}
		}		
?>
	<td><input type="radio" name="<?=$sEgo;?>" <?=($iEgoChecked==1?"checked":"");?> value="1" onClick='check(this,<?=$iNumQuestion?>);' />
	<td><input type="radio" name="<?=$sEgo;?>" <?=($iEgoChecked==2?"checked":"");?> value="2" onClick='check(this,<?=$iNumQuestion?>);' />
	<td><input type="radio" name="<?=$sEgo;?>" <?=($iEgoChecked==3?"checked":"");?> value="3" onClick='check(this,<?=$iNumQuestion?>);' />
	<td><input type="radio" name="<?=$sEgo;?>" <?=($iEgoChecked==4?"checked":"");?> value="4" onClick='check(this,<?=$iNumQuestion?>);' />

	<td><input type="radio" name="<?=$sWish;?>" <?=($iWishChecked==1?"checked":"");?> value="1" onClick='check(this,<?=$iNumQuestion?>);' />
	<td><input type="radio" name="<?=$sWish;?>" <?=($iWishChecked==2?"checked":"");?> value="2" onClick='check(this,<?=$iNumQuestion?>);' />
	<td><input type="radio" name="<?=$sWish;?>" <?=($iWishChecked==3?"checked":"");?> value="3" onClick='check(this,<?=$iNumQuestion?>);' />
	<td><input type="radio" name="<?=$sWish;?>" <?=($iWishChecked==4?"checked":"");?> value="4" onClick='check(this,<?=$iNumQuestion?>);' />
	</tr>
<?php
	}else{
		// mehrere Lehrer
		for($p=0; $p<$iTeachCount; $p++){
			echo '<td><select name="_'.$aQuestion[$i]['id']."_".$aAddTeacher[$p]."_".'ego">';
			for($e=0; $e<count($aEgoOptions); $e++){
				echo '<option value="'.($e).'">'.$aEgoOptions[$e].'</option>';
			}
			echo "</td>";
			echo '<td><select name="_'.$aQuestion[$i]['id']."_".$aAddTeacher[$p]."_".'wish">';
			for($a=0; $a<count($aWishOptions); $a++){
				echo '<option value="'.($a).'">'.$aWishOptions[$a].'</option>';
			}
			echo "</td>";
		}	
	}
?>

